package com.goal.struggle.service.goal.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.goal.struggle.convert.goal.GoalDailyConvert;
import com.goal.struggle.dao.goal.GoalDailyMapper;
import com.goal.struggle.model.repository.goal.GoalDailyDO;
import com.goal.struggle.model.vo.goal.GoalDailyVO;
import com.goal.struggle.service.goal.GoalDailyService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoalDailyServiceImpl extends ServiceImpl<GoalDailyMapper, GoalDailyDO> implements GoalDailyService {

    public List<GoalDailyVO> getGoalDailyByUserId(int userId) {
        List<GoalDailyDO> userDailGoalList = this.baseMapper.getGoalDailyByUserId(userId);
        List<GoalDailyVO> goalDailyVOS = GoalDailyConvert.INSTANCE.doTOvo(userDailGoalList);
        return goalDailyVOS;
    }
}
